package com.jdn;

/**
 * User: arsentyev
 * Date: 21.08.12
 */
public class Main {
    public static void main(String... args) throws Exception {
        Container container = Parser.parse(new java.util.Scanner(new java.io.FileInputStream("D:\\dev\\proj\\JDN\\web\\InputStreamReader.java"), "UTF-8").useDelimiter("\\A").next(), "java.io.InputStreamReader");

        String html = HtmlBuilder.buildHtml(container);
        FileUtils.writeToFile("D:\\dev\\docs\\src\\"+ container.getPathName() +".html", html);
    }

    private static Container getContainer() {
        Container con = new Container();

        con.setClassName("InputStreamReader");
        con.setSummary("Main description here");
        con.setPackageName("java.io");
        con.setSince("1.1");
        con.setHierarchy(new Container.Hierarchy("java.lang.Object", new Container.Hierarchy("java.io.Reader", new Container.Hierarchy("java.io.InputStreamReader", null))));
        con.addAuthor("Doug Lea");
        con.setSyntax("public class InputStreamReader extends Reader");

        con.addConstructor(new Container.Wrapper("InputStreamReader(InputStream in)", "Creates an InputStreamReader that uses the default charset.", "public"));
        con.addField(new Container.FieldWrapper("sd", "", "private", "StreamDecoder"));
        con.addMethod(new Container.Wrapper("read()", "Reads a single character.", "public"));

        return con;
    }
}
/*
        Instrumentation inst = InstrumentHook.getInstrumentation();
        for (Class<?> clazz: inst.getAllLoadedClasses()) {
            System.out.println(clazz.getName());
        }
*/